﻿#include <QCoreApplication>

#include "product.h"
#include "concreteproducta.h"
#include "concreteproductb.h"
#include "factory.h"

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    Factory factory;
    AbstractProduct* productA = factory.createProduct("A");
    productA->use();

    AbstractProduct* productB = factory.createProduct("B");
    productB->use();

    delete productA;
    delete productB;

    return a.exec();
}
